﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="website_admin_members_memberinfoeditor"
    CodeFile="memberinfoeditor.aspx.cs" %>

<%@ Register Src="../../admin/_root/_controls/ctlNavBar.ascx" TagName="ctlNavBar"
    TagPrefix="uc1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>
    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../admin/_static/_jQuery/jquery_validator.js"></script>
    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>
    <script language="javascript" src="../_static/_jQuery/jquery-fileupload.js" type="text/javascript"></script>
    <script language="javascript" src="../_static/_jQuery/jquery_json.js" type="text/javascript"></script>
    <script language="javascript" src="../_static/_jQuery/jquery_stringutil.js" type="text/javascript"></script>
    <script language="javascript" src="../_static/_jQuery/interface.js" type="text/javascript"></script>
      <link href="../_common/styles/form_v2_0.css" rel="stylesheet" type="text/css" />
    <script language="javascript" src="../../_common/datepicker/wdatepicker.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(setup);
        function setup() {
            validator.setup("#crmForm");
            if (getUrlParam("otype") == "modify") {
                LoadRegionList("init", "city", 1);
                LoadRegionList("init", "countie", 2);
                $("#txtPassword").attr("readonly", true);
                $("#txtPassword").val("12345678");
            }
        }
        function Cancel() {
            var groupid = getUrlParam("groupid");
            window.location.href = "membersmaglist.aspx?groupid=" + groupid;
        }
        function LoadRegionList(loadingtype, layername, _layer) {
            var _parentid = "";

            if (layername == "city")
                _parentid = $("#selProvinceList").val();

            if (layername == "countie")
                _parentid = $("#selCityList").val();

            if (_parentid != "") {
                if (loadingtype != "init") {
                    GetDrpListTextToTargetObj("selProvinceList", "txtRegionInfo");

                    $("#txtProvinceId").val($("#selProvinceList").val());
                }

                $.ajax({
                    async: false,
                    type: "POST",
                    url: "memberinfoeditor.aspx",
                    data: { otype: "getcitylist", _layername: layername, parentid: _parentid },
                    success: function (data, textStatus) {
                        switch (_layer) {
                            case 1:
                                $("#selCityList").emptySelect().append(data).change(function () {
                                    LoadRegionList("event", "countie", 2);
                                    $("#txtRegionId").val($("#selCityList").val());
                                    $("#txtCityId").val($("#selCityList").val());

                                    if ($("#selCityList").val() != "0")
                                        $("#txtRegionInfo").val(GetDrpListText("selProvinceList") + " | " + GetDrpListText("selCityList"));
                                    else
                                        GetDrpListTextToTargetObj("selProvinceList", "txtRegionInfo");
                                });
                                break;
                            case 2:
                                $("#selCountiesList").emptySelect().append(data).change(function () {
                                    $("#txtRegionId").val($("#selCountiesList").val());
                                    $("#txtCountieId").val($("#selCountiesList").val());

                                    if ($("#selCountiesList").val() != "0")
                                        $("#txtRegionInfo").val(GetDrpListText("selProvinceList") + " | " + GetDrpListText("selCityList") + " | " + GetDrpListText("selCountiesList"));
                                    else
                                        $("#txtRegionInfo").val(GetDrpListText("selProvinceList") + " | " + GetDrpListText("selCityList"));
                                });
                                break;
                        }
                    }
                });

                if (loadingtype == "init") {
                    if ($("#txtCountieId").val() != "0")
                        $("#selCountiesList").val($("#txtCountieId").val());
                    if ($("#txtCityId").val() != "0")
                        $("#selCityList").val($("#txtCityId").val());
                }
            }
            else {
                $("#selCityList").emptySelect().append("<option value=''>-- 请选择城市 --</option>");
                $("#selCountiesList").emptySelect().append("<option value=''>-- 请选择区县 --</option>");
                $("#txtProvinceId").val("0");
                $("#txtCityId").val("0");
                $("#txtCountieId").val("0");
                $("#txtRegionId").val("0");
                $("#txtRegionInfo").val("");
            }
        }
        function LoadFunctionDataList() {

        }
    </script>
</head>
<body scrool="no" style="margin: 0px; padding: 0px; background: #F0F0F0;">
    <script type="text/javascript">
    <!--
        function ___doPostBack(eventTarget, eventArgument) {
            var theForm = document.forms["crmForm"];
            if (!theForm) {
                theForm = document.crmForm;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.___EVENTTARGET.value = eventTarget;
                theForm.___EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }
    // -->
    </script>


    <div id="success" style="position: absolute; z-index: 300; height: 130px; width: 284px;
        left: 50%; top: 50%; margin-left: -150px; margin-top: -80px;">
        <div style="position: absolute; z-index: 300; width: 270px; height: 90px; background-color: #FFFFFF;
            border: solid #6699CC 1px; font-size: 14px;">
            <div style="height: 64px; line-height: 150%; padding: 0px 3px 0px 3px;" align="center">
                <br />
                <table>
                    <tr>
                        <td valign="top">
                            <img border="0" src="../_imgs/admin/progress.gif" />
                        </td>
                        <td valign="middle" style="font-size: 14px; width: 150px;">
                            操作执行中 ...<br />
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </div>
        <div style="position: absolute; width: 270px; height: 108px; z-index: 299; left: 4px;
            top: 5px; background-color: #E8E8E8; border: #E8E8E8 1px solid; display: none;">
        </div>
    </div>
    <script type="text/javascript">
        document.getElementById("success").style.display = "none"; 
    </script>
    <script src="../../admin/_static/_common/scripts/divcover.js" type="text/javascript"></script>
    <form id="crmForm" runat="server">
     <input type="hidden" name="___EVENTARGUMENT" id="___EVENTARGUMENT" value="" /> 
    <input type="hidden" name="___EVENTTARGET" id="___EVENTTARGET" value="" />
    <table cellpadding="0" cellspacing="0" class="WIN-Form-Layout">
        <tr style="height: 32px;">
            <td colspan="1" class="WIN-Form-Title-Bar">
                <span>编辑会员信息</span>
            </td>
        </tr>
        <tr style="height: 100%; background: #ffffff;">
            <td valign="top" style="padding: 10px 10px 10px 0px;">
                <div class="content">
                    <div class="checkoutBox noBorder" id="errorMsg" runat="server" style="background: #FFFDCF;
                        width: 762px; line-height: 21px; padding: 10px;" visible="false">
                    </div>
                    <div class="checkoutBox noBorder">
                         <div class="tabContainer">
                            <ul class="tabHead">
                                <li class="currentBtn"><a id="a21" href="javascript:void(0);" onclick="tab_switch(this);" title="General" rel="21">
                                    常规</a></li>                             
                            </ul>
                        </div>
                        <div class="clear">
                        </div>
                        <ul class="infoList edit" id="tab_21">
                            <li style="width: 100%; height: auto;">
                                <table cellpadding="1" cellspacing="5" style="border: 0px; table-layout: fixed; width: 960px;
                                    font-size: 12px;" class="stdTable">
                                    <colgroup>
                                        <col style="width: 115px;" />
                                        <col />
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                    </colgroup>
                                    <tbody>
                                        <tr valign="top">
                                            <td>
                                                用户名：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtUsername" name="txtUsername" style="width: 150px;"
                                                    runat="server" required="required" controlname="用户名" isvalidator />
                                            </td>
                                            <td>
                                                登录密码：
                                            </td>
                                            <td>
                                                <input type="password" class="tbxReadOnly" id="txtPassword" name="txtPassword" runat="server"
                                                    style="width: 150px;" required="required" controlname="登录密码" isvalidator />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                昵称：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" style="width: 150px;" id="txtMobileAlias"
                                                    name="txtMobileAlias" runat="server" />
                                            </td>
                                            <td>
                                                真实姓名：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" style="width: 150px;" id="txtFullName" name="txtFullName"
                                                    runat="server" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                性别：
                                            </td>
                                            <td class="rdolblClass">
                                                <asp:RadioButtonList ID="rbtGenderList" runat="server" RepeatDirection="Horizontal"
                                                    CellPadding="0" CellSpacing="0">
                                                    <asp:ListItem Value="0" Text="男"></asp:ListItem>
                                                    <asp:ListItem Value="1" Text="女"></asp:ListItem>
                                                    <asp:ListItem Value="-1" Text="未知"></asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td>
                                            <td>
                                                生日：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" style="width: 150px;" id="txtBirthday" name="txtBirthday"
                                                    onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" runat="server" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                E-Mail：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtEmail" name="txtEmail" runat="server"
                                                    style="width: 150px;" required="required" controlname="E-Mail" isvalidator datatype="email" />
                                            </td>
                                            <td>
                                                联系电话：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtTel" name="txtTel" value="0" style="width: 150px;"
                                                    runat="server" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtMobile" name="txtMobile" runat="server"
                                                    style="width: 150px;" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                所属地区：
                                            </td>
                                            <td colspan="3">
                                                <span style="float: left; margin: 0px 5px 0px 0px;">
                                                    <select id="selProvinceList" runat="server" class="SelectBox" style="width: auto;">
                                                    </select>
                                                </span><span style="float: left; margin: 0px 5px;">
                                                    <select id="selCityList" name="selCityList" class="SelectBox" style="width: auto;">
                                                        <option value="">-- 选择城市 --</option>
                                                    </select>
                                                </span><span style="float: left; margin: 0px 5px;">
                                                    <select id="selCountiesList" name="selCountiesList" class="SelectBox" style="width: auto;">
                                                        <option value="">-- 选择区县 --</option>
                                                    </select>
                                                </span>
                                                <input id="txtCountryId" runat="server" type="hidden" value="0" />
                                                <input id="txtProvinceId" runat="server" type="hidden" value="0" />
                                                <input id="txtCityId" runat="server" type="hidden" value="0" />
                                                <input id="txtCountieId" runat="server" type="hidden" value="0" />
                                                <input id="txtRegionId" runat="server" type="hidden" />
                                                <input id="txtRegionInfo" runat="server" type="hidden" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                联系地址：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtAddress" name="txtAddress" runat="server" />
                                            </td>
                                            <td>
                                                邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtZIP" name="txtZIP" runat="server" style="width: 150px;" />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                审核状态：
                                            </td>
                                            <td>
                                                <select id="selIsApproved" runat="server" class="SelectBox" style="width: 150px;"
                                                    required="required" controlname="审核状态" isvalidator>
                                                    <option value="">-- 请选择审核状态 --</option>
                                                    <option value="1" selected>已审核</option>
                                                    <option value="0">未审核</option>
                                                </select>
                                            </td>
                                            <td>
                                                帐号状态：
                                            </td>
                                            <td>
                                                <select id="selIsLockedOut" runat="server" class="SelectBox" style="width: 150px;"
                                                    required="required" controlname="帐号状态" isvalidator>
                                                    <option value="">-- 请选择帐号状态 --</option>
                                                    <option value="1">锁定</option>
                                                    <option value="0" selected>活动</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td colspan="4" style="border-bottom: 1px solid #ccc; font-weight: bold;">
                                                活动信息
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                注册时间：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtCreatedDate" name="txtCreatedDate"
                                                    value="" style="width: 150px;" runat="server" readonly />
                                            </td>
                                            <td>
                                                最后一次登录时间：
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtLastLoginDate" name="txtLastLoginDate"
                                                    value="" style="width: 150px;" runat="server" readonly />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </li>
                        </ul>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr style="height: 45px;">
            <td class="WIN-Form-Bottom">              
                <input type="button" value="保存" id="Button1" class="btn_s" onclick="if(validator.validatorAll()){this.disabled=true;success.style.display='block';HideOverSels('success');___doPostBack('save', 'save');}"
                    style="width: 120px; height: 25px; margin: 0px 5px;" />
                <input type="button" value="关闭" id="Button2" class="btn_s" onclick="Cancel();" style="height: 25px;
                    width: 120px; margin: 0px 5px;" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
